import requests


def search_by_name(name: str, offset=0, fetch_size=10):
    url = "https://fs.qiuziti.com/getFontsByName"
    resp = requests.post(url, data={"fontName": name, "offest": offset, "fetch_size": fetch_size}).json()
    print(resp)
    ok = resp.get("is_success")
    if not ok:
        return False, resp.get("error")
    return True, resp["data"]


if __name__ == '__main__':
    search_by_name("方正", )
